package com.pesilo.mvc.view.component.mediator
{
	import com.pesilo.event.PesiloEvent;
	import com.pesilo.mvc.controller.ApplicationFacade;
	import com.pesilo.mvc.view.component.module.homepageModule.HomepageComponent;
	
	import flash.events.Event;
	
	import org.puremvc.as3.multicore.interfaces.IMediator;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.mediator.Mediator;

	public class HomepageMediator extends Mediator implements IMediator
	{
		public static const NAME:String="HomepageMediator";
		public function HomepageMediator(viewComponent:Object)
		{
			super(NAME,viewComponent);
			
			initEvent();
		}
		
		private function initEvent():void
		{
			view.addEventListener(PesiloEvent.APP_EXIT_COMPLETE_EVENT,__appExitCompleteHandle);
		}
		
		protected function __appExitCompleteHandle(e:PesiloEvent):void
		{
			facade.sendNotification(ApplicationFacade.HIDE_SHOW_CONTAINER_EVENT);
			
			switch(int(e.data)){
				case 0:
					break;
				case 1:
					break;
				case 2:
					break;
				case 3:
					break;
				case 4:
					break;
			}
		}
		
		override public function listNotificationInterests():Array{
			return[
				
			]
		}
		
		override public function handleNotification(notification:INotification):void{
			switch(notification.getName()){
				
			}
		}
		
		protected function get view():HomepageComponent{
			return viewComponent as HomepageComponent;
		}
	}
}